/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package comunicatorserver.EntityClasses;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Ricardo
 */
@Entity
@Table(name = "mails")
@NamedQueries({@NamedQuery(name = "Mails.findAll", query = "SELECT m FROM Mails m"), @NamedQuery(name = "Mails.findById", query = "SELECT m FROM Mails m WHERE m.id = :id"), @NamedQuery(name = "Mails.findByNome", query = "SELECT m FROM Mails m WHERE m.nome = :nome"), @NamedQuery(name = "Mails.findByMail", query = "SELECT m FROM Mails m WHERE m.mail = :mail"), @NamedQuery(name = "Mails.findByTelemovel", query = "SELECT m FROM Mails m WHERE m.telemovel = :telemovel")})
public class Mails implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "nome")
    private String nome;
    @Column(name = "mail")
    private String mail;
    @Column(name = "telemovel")
    private Integer telemovel;

    public Mails() {
    }

    public Mails(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public Integer getTelemovel() {
        return telemovel;
    }

    public void setTelemovel(Integer telemovel) {
        this.telemovel = telemovel;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Mails)) {
            return false;
        }
        Mails other = (Mails) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "comunicatorserver.EntityClasses.Mails[id=" + id + "]";
    }

}
